# coding: utf-8

# import yaml
#
# with open(r'k8s-yaml/prometheus/sa.yaml',mode='r',encoding='utf-8') as f:
#     res = yaml.load(f.read(),Loader=yaml.FullLoader) # 将yaml转化为python字典
#     res['apiVersion'] = 'v2' # 更新
#     # 覆盖旧的yaml文档
#     with open(r'k8s-yaml/prometheus/sa.yaml',mode='w',encoding='utf-8') as f2:
#         yaml.dump(data=res,stream=f2,allow_unicode=True)
